import request from '../../../utils/request'
import { praseStrEmpty } from '../../../utils/ruoyi'

// 查询客户基础信息列表
export function listClientBase(query) {
  return request({
    url: '/client/base/list',
    method: 'get',
    params: query
  })
}

// 查询客户基础信息详细
export function getClientBase(id) {
  return request({
    url: '/client/base/' + id,
    method: 'get'
  })
}

// 新增客户基础信息
export function addClientBase(data) {
  return request({
    url: '/client/base',
    method: 'post',
    data: data
  })
}

// 修改客户基础信息
export function updateClientBase(data) {
  return request({
    url: '/client/base',
    method: 'put',
    data: data
  })
}

// 删除客户基础信息
export function delClientBase(id) {
  return request({
    url: '/client/base/' + id,
    method: 'delete'
  })
}

// 国标列表（树状结构）
export function isicTree() {
  return request({
    url: '/client/base/isic/tree',
    method: 'get'
  })
}

// 按照Code获取国标详情
export function isicByCode(code) {
  return request({
    url: '/client/base/isic/' + code,
    method: 'get'
  })
}

// 查询客户名称
export function getClientName(ids) {
  return request({
    url: '/client/base/getClientName/' + praseStrEmpty(ids)
  })
}

